gadget: Handle visibility
authorBenjamin Otte <otte@redhat.com>
Wed, 23 Dec 2015 00:50:20 +0000 (01:50 +0100)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 29 Dec 2015 21:48:58 +0000 (13:48 -0800)
commitacbff854029cc5b308c92024990abeb81355c360
treebbd8b1a72fc2f4b819b726dd5cd9de5dff96b6b3
parent9950764f1224c61ad482c9ccfb1bf7e7667b10f7
gadget: Handle visibility

As GtkCssNode has the visibility concept, it makes sense to mirror it in
gadgets.

Do what visibility does in widgets: Hidden gadgets can't be drawn or
allocated and request a 0x0 size.

Note that just like widgets, gadget visibility must not be changed in
size request, allocate or draw handlers.

GtkWidget::child-visible has no equivalent yet, code will have to
emulate that manually.
gtk/gtkcssgadget.c
gtk/gtkcssgadgetprivate.h